import zlib, gzip, bz2

s = b"hello world"
data1 = zlib.compress(s)
print(zlib.decompress(data1))
data2 = gzip.compress(s)
print(gzip.decompress(data2))
data3 = bz2.compress(s)
print(bz2.decompress(data3))
